/**
 * ===========================================
 * Project: gamehistory-service
 * ===========================================
 * Package: com.cyou.gamehistory.repository
 * 
 * Copyright (c) 2012, CYOU All Rights Reserved.
 * ===========================================
 */
package com.cyou.gamehistory.repository;

import java.util.List;
import java.util.Map;

import com.cyou.framework.mybatis.MyBatisRepository;
import com.cyou.framework.pagination.proxy.PaginationSupport;
import com.cyou.gamehistory.entity.UserInfo;

/**
 * <p>UserInfo</p>
 *
 * @since 1.0
 * @version 1.0 2012-12-2
 * @author zhangxingkai
 */
@MyBatisRepository
public interface UserInfoDao {
	
	UserInfo get(long id);
	
	UserInfo getByUserId(long userId);
	
	UserInfo getByPassport(String passport);
	
	void save(UserInfo userInfo);
	
	void update(UserInfo userInfo);
	
	void delete(Long id);
	
	void deleteByUserId(Long userId);
	
	void deleteByPassport(Long passport);
	
	Integer rank(Integer userId);

	Integer userCount();

	List<UserInfo> getTopUserInfoList();

	PaginationSupport<UserInfo> findAllUserInfoList(Map<String, Object> map);

}
